/*
 * @Author: your name
 * @Date: 2022-01-23 23:09:10
 * @LastEditTime: 2022-01-25 01:26:31
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \json-serveg:\桌面2\VueStudy\vue-ego\vue-ego\server\index.js
 */
//搭建express服务
const express = require('express')
const app = express()
//路由
const router = require('./router')
//post 请求表单数据
app.use(express.urlencoded({ extended: true }))
//静态文件托管 ----  访问：http:localhost:8989/图片.jpg
app.use(express.static('upload'))


app.use('/api',router)


app.listen(8989,()=>{
    console.log(8989);
})
